package com.jvm.shk;

import java.util.ArrayList;
import java.util.Random;

/**
 * @author ：qs
 * @date ：Created in 2022/9/25
 * @description：
 * -Xms60m -Xmx60m -XX:SurvivorRatio=8
 * @modified By：
 */
public class OOMTest {

    public static void main(String[] args) {
        ArrayList<Picture> list = new ArrayList<Picture>();

        while (true){
            try {
                Thread.sleep(5);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
            list.add(new Picture(new Random().nextInt(100*50)));

        }

    }
}

class Picture{
    private byte[] pixels;

    public Picture(int length){
        this.pixels = new byte[length];
    }
}
